﻿using Newtonsoft.Json;

namespace Ecobee.Net
{
	public class Page : ApiObject
	{
		private int _currentPage = 0;
		private int _totalPages = 0;
		private int _pageSize = 0;
		private int _total = 0;

		/// <summary>
		/// The page retrieved or, in the case of a request parameter, the specific page requested.
		/// </summary>
		[JsonProperty(PropertyName = "page")]
		public int CurrentPage
		{
			get
			{
				return _currentPage;
			}
			set
			{
				_currentPage= value;
			}
		}

		/// <summary>
		/// The total pages available. 
		/// </summary>
		[JsonProperty(PropertyName = "totalPages")]
		public int TotalPages
		{
			get
			{
				return _totalPages;
			}
			set
			{
				_totalPages= value;
			}
		}

		/// <summary>
		/// The number of objects on this page.
		/// </summary>
		[JsonProperty(PropertyName = "pageSize")]
		public int PageSize
		{
			get
			{
				return _pageSize;
			}
			set
			{
				_pageSize= value;
			}
		}

		/// <summary>
		/// The total number of objects available.
		/// </summary>
		[JsonProperty(PropertyName = "total")]
		public int Total
		{
			get
			{
				return _total;			
			}
			set
			{
				_total = value;
			}
		}
	}
}
